package com.phoenix.callAnalysis.utils;

import java.util.ArrayList;
import java.util.HashMap;

import com.phoenix.callAnalysis.models.MyCall;

import android.content.Context;
import android.util.Log;

public class Utils {
	private static final String TAG = Utils.class.getSimpleName();

	private final Context context;

	public Utils(Context context) {
		Log.d(TAG, "Utils(Context context)");
		this.context = context;
	}

	/**
	 * one integer in a string
	 * @param stringID
	 *            string id
	 * @param i
	 *            the replace integer
	 * @return replaced string
	 */
	public String getDynamicString(int stringID, int i) {
		return String.format(context.getString(stringID), i);
	}
	
	/**
	 * two integer in a string
	 * @param stringID
	 * @param i1
	 * @param i2
	 * @return replaced string
	 */
	public String getDynamicString(int stringID, int i1, int i2) {
		return String.format(context.getString(stringID), i1, i2);
	}

	/**
	 * for call frequency analysis
	 * @param beginDay
	 * @param endDay
	 * @param topN get top N ASC or DESC
	 * @param order ASC or DESC
	 * @return
	 */
	public ArrayList<HashMap<String, ArrayList<Integer>>> getCallsByFrequency(long beginDay, long endDay,
			int topN, int order, int dataSource) {
		
		return null;
	}
}
